返回曲线组成的闭合区域面积
[helpstring("method GetArea")] HRESULT GetArea([out] DOUBLE* pArea, [out,retval] VARIANT_BOOL* isOk);
参数 |
说明 |
[out] DOUBLE* pArea |
返回闭合区域面积 |
成功返回TRUE
例如: C#代码,计算面积
MxDrawPolyline pl = new MxDrawPolyline(); MxDrawPoint pt1 = new MxDrawPoint(); pt1.x = 10; pt1.y = 10; MxDrawPoint pt2 = new MxDrawPoint(); pt2.x = 20; pt2.y = 20; MxDrawPoint pt3 = new MxDrawPoint(); pt3.x = 30.5; pt3.y = 10; pl.AddVertexAt(pt1); pl.AddVertexAt(pt2); pl.AddVertexAt(pt3); pl.IsClosedStatus = true; double dArea = 0.0; pl.GetArea(out dArea);